import request from "@/utils/request";
/*
 * 1.定制模板列表(分页)
 * */
export const configList = data => {
  return request({
    url: "/mall/tenant/customization/template/pageList",
    method: "post",
    data
  });
};
/*
 * 1.3.编辑/保存模板信息
 * */
export const configEdit = data => {
  return request({
    url: "/mall/tenant/customization/template/save",
    method: "post",
    data
  });
};
/*
 *4.删除模板信息
 * */
export const configDelete = data => {
  return request({
    url: "/mall/tenant/customization/template/delete",
    method: "post",
    data
  });
};
/*
 *2.定制模板列表(下拉)
 * */
export const templateList = data => {
  return request({
    url: "/mall/tenant/customization/template/list",
    method: "post",
    data
  });
};
/*
 *2.8.定制模板列表，排除传入的模板id(下拉)
 * */
export const templateListExclude = data => {
  return request({
    url: "/mall/tenant/customization/template/list/exclude",
    method: "post",
    data
  });
};
/*
 *2.7.获取详情
 * */
export const templateDetail = data => {
  return request({
    url: "/mall/tenant/customization/template/detail",
    method: "get",
    params: data
  });
};
// 模板关联的商品
/*
 *5.模板关联的商品列表
 * */
export const productList = data => {
  return request({
    url: "/mall/tenant/customization/template/productList",
    method: "post",
    data
  });
};
// 模板关联的商品
/*
 *5.模板关联的商品列表
 * */
export const searchProducts = data => {
  return request({
    url: "/mall/tenant/customization/template/searchProducts",
    method: "post",
    data
  });
};
/*
 *5.6.商品批量关联模板
 * */
export const addRelation = data => {
  return request({
    url: "/mall/tenant/customization/template/relation",
    method: "post",
    data
  });
};
